package com.leinao.constant;

/**
 *
 * @Description 数据集错误码
 * @author lizi
 * @date 2018/10/17 上午11:15
 * @Version 1.0
 */
public enum ProjectErrorEnum {
    // 获取用户信息失败
    USER_INFO_GET_FAILURE(20005, "user info get failure"),
    // 项目ID参数无效
    INVALID_PROJECT_ID(30002, "invalid projectId param"),
    // 项目无权限
    PROJECT_NO_AUTHORITY(30003, "project no authority"),
    // 项目已经公开
    PROJECT_ALREADY_PUBLIC(30004, "project already public"),
    // 数据集ID参数无效
    INVALID_DATASET_ID(30005, "invalid datasetId param"),
    // 排序参数无效
    INVALID_SORT_TYPE(30006, "invalid sortType param"),
    // 项目非公开
    PROJECT_NOT_PUBLIC(30007, "project not public"),
    // 项目代码拷贝失败
    PROJECT_FILE_COPY_FAILURE(30008, "project file copy failure"),
    // 项目存在非个人私有数据集
    PROJECT_EXISTS_PRIVATE_DATASET(30009, "project exists private dataset"),
    // 分类ID或自定义分类名称需要
    CATEGORY_ID_NAME_REQUIRED(30010, "category id or name is required"),
    // 分类关联已存在
    CATEGORY_RELATION_EXISTS(30011, "category relation exists"),
    // 分类关联关系不存在
    CATEGORY_RELATION_NOT_EXISTS(30012, "category relation not exists"),
    // 分类参数为空
    CATEGORY_PARAM_EMPTY(30013, "category param is empty"),
    // 事例项目不存在
    EXAMPLE_PROJECT_NOT_EXISTS(30014, "example public project not exists"),
    // 功能浏览记录已经存在
    BROWSE_RECORD_EXISTS(30015, "browse record already exists"),
    // 创建任务输出目录失败
    JOB_OUTPUTS_CREATE_FAILURE(30016, "create job outputs failure"),
    // 主体ID无效
    OBJECT_ID_INVALID(30011, "object id invalid"),
    // 项目任务ID参数无效
    INVALID_PROJECT_JOB_ID(30015, "invalid projectJobId param"),
    // 只有普通任务可以公开
    COMMON_JOB_CAN_PUBLIC(30016, "only common job can be made public"),
    // 只有成功任务可以公开
    ONLY_SUCCESS_JOB_CAN_PUBLIC(30019, "only success job can be made public"),
    // 封面文件ID参数无效
    INVALID_FILE_ID(30017, "invalid fileId param"),
    // 公开项目必须有公开任务
    OPEN_PROJECT_JOB_CAN_NOT_BE_NULL(30018, "open project job cannot be null！"),

    // 仓库初始化失败
    REPOSITORY_INIT_FAILURE(30100, "repository init failure"),
    // 代码分支创建失败
    TAG_CREATE_FAILURE(30101, "tag create failure"),

    // 项目没有代码,参见文件中心异常码
    PROJECT_NOT_CONTAINS_FILE(40008, "project not contains file"),
    // 文件已经存在,参见文件中心异常码
    FILE_EXIST(10000, "file already exist"),

    PARAM_FORMAT_ERROR(-3,"运行任务参数格式有误"),

	PARAM_ERROR(-2,"入参缺失或错误"),
	
	PROJECT_NAME_FAILED(-3,"项目名称重复"),
	
	OPERATE_PROJECT_FAILED(-4,"操作项目失败"),
	
	PROJECT_NAME_ERROR(-5,"项目名称未以字母开头"),
	
	PROJECT_NAME_LENGTH(-6,"项目名称长度过长"),
	
	PROFILE_LENGTH(-7,"项目描述长度过长"),
	
	PROJECT_NAME_NULL(-8,"项目名称未填写"),
	
	OPERATE_PROJECT_SUCCESS(0,"操作项目成功"),
	
	CREATE_PROJECT_FAILED(-9,"创建项目失败"),
	
	PROJECT_SUCCESS(0,"创建项目成功"),

    PROJECT_CONTAIN_PRIVATE_DATASET(50006,"项目中包含私有数据集不可公开该项目"),

    GET_PUBLIC_JOB_PARAMS_ERROR(20001, "获取任务参数失败 "),

    PROJECT_CONTAIN_PRIVATE_MODEL(50007,"项目中包含私有模型不可公开该项目"),

    PROJECT_CONTAIN_PRIVATE_MODEL_AND_DATASET(50008,"项目中包含私有模型和私有数据集不可公开该项目"),

	PROJECT_IS_NOT_PUBLIC(20000,"当前勾选任务有未公开任务"),

    GET_PROJECT_MODELS_ERROR(20001,"获取项目模型列表失败");


    private Integer seq;

    private String desc;

    ProjectErrorEnum(Integer seq, String desc) {
        this.seq = seq;
        this.desc = desc;
    }

	public int getSeq() {
		return seq;
	}

	public String getDesc() {
		return desc;
	}

}